﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Config1
{
    public class Test2
    {
        private readonly IOptionsSnapshot<Proxy> optProxy;

        public Test2(IOptionsSnapshot<Proxy> optProxy)
        {
            this.optProxy = optProxy;
        }

        public void Test()
        {
            Console.WriteLine(optProxy.Value.Address);
        }

    }
}
